package onlinebanking.server.objects;

import java.sql.ResultSet;

import onlinebanking.server.SimpleServer;
import onlinebanking.sql.SQLConnection;
import onlinebanking.sql.SQLTable;

/**
 * Basic structure of server objects
 * 
 * @author Del Mundo
 * 
 */
public class QueryObject {

	/**
	 * Used to execute SQL commands to the database
	 */
	protected SQLTable sqltable;
	/**
	 * Results generated from the SQL commands
	 */
	protected ResultSet resultset;

	private SQLConnection sqlConnection;
	
	protected QueryObject() {
		// get connection from SimpleServer
		this.sqlConnection = SQLConnection.getInstance();
		this.sqltable = new SQLTable(this.sqlConnection.getConnection());
	}

	public void setSQLTable(SQLTable sqltable) {
		this.sqltable = sqltable;
	}

}
